package hip.util;

import java.util.LinkedHashMap;
import java.util.Map;

public class Main {
    public static void main(String[] args) throws Exception {
        String url = "https://hihistest.rahos.gov.cn:9528/ws/hai/WebServiceEntry?wsdl";
        WsClient wsClient = new WsClient(url, "http://ws.config.hihis.bsoft.com/", false);
        Map<String, Object> req = new LinkedHashMap<>();
        req.put("service", "UpdateExmRequestStatus_MRC");
        req.put("uid", "test");
        req.put("pwd", "test");
        String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<BSXml><MsgHeader><Sender>MRC</Sender><MsgType>ODS_2210</MsgType><Organization>JG000001</Organization><ServiceType>service</ServiceType><MsgVersion>3.3</MsgVersion></MsgHeader><MsgBody><Patient><SourcePatientId>10000040</SourcePatientId><Name>测试患者006</Name><DomainId></DomainId><SourceVisitId>000000001</SourceVisitId><SourcePatientIdType>OV</SourcePatientIdType><ClinicId>10000040</ClinicId><HospizationId></HospizationId><AuthorOrganization>JG000001</AuthorOrganization></Patient><Visit><VisitId>000000001</VisitId><PatientType DisplayName=\"门诊\">1</PatientType><ClinicId>10000040</ClinicId><HospizationId>10000040</HospizationId><VisitTimes>null</VisitTimes></Visit><ExamStatusInfo><RequestId>00000091420231206JC</RequestId><VisitOrganization DisplayName=\"瑞安市人民医院\">JG000001</VisitOrganization><PatientType DisplayName=\"门诊\">1</PatientType><ExecutiveDeptCode>581212</ExecutiveDeptCode><ExecutiveDeptName>放射测试BM0000091</ExecutiveDeptName><SickbedId></SickbedId><OperatingDateTime></OperatingDateTime><DeptCode>589068</DeptCode><DeptName>普通儿科门诊(瑞祥)</DeptName><ItemList><Item><ExamId>RX93615808</ExamId><ItemCode>4_ES0005</ItemCode><ItemName>胃镜_超声内镜</ItemName><ExeOrganization DisplayName=\"瑞安市人民医院\">JG000001</ExeOrganization><ExamStatusCode>4</ExamStatusCode></Item></ItemList></ExamStatusInfo><ClpInfos><ClpInfo><BusinessID>00000091420231206JC</BusinessID><BusinessCircleID>0</BusinessCircleID><OperatorCode>3289</OperatorCode><OperatorName>项剑乔</OperatorName><OperateDeptCode>589068</OperateDeptCode><OperateDeptName>普通儿科门诊(瑞祥)</OperateDeptName><OperateDateTime>20231207T092409</OperateDateTime><BusinessCompsiteID></BusinessCompsiteID><GroupId></GroupId><GroupName></GroupName><OperateComments></OperateComments><FlowCode>0104</FlowCode><FlowName>检查闭环(门诊)</FlowName><OperateTypeCode>01040202</OperateTypeCode><OperateTypeName>取消预约</OperateTypeName></ClpInfo></ClpInfos></MsgBody></BSXml>";
        req.put("parameter", xml);
        Map<String, String> resp = wsClient.sendReceive("invoke", req, "http://ws.config.hihis.bsoft.com/invoke");
        System.out.println("");
    }
}
